package com.morningyet.bug.log4j2.application.config;

import com.morningyet.bug.log4j2.application.cache.CaffeineTemplate;
import com.morningyet.bug.log4j2.application.controller.vo.UserVO;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 缓存配置
 *
 * @author moringyet
 */
@Configuration
public class CacheConfig {

    @Bean("userCaffeineTemplate")
    public CaffeineTemplate<String, UserVO> userCaffeineTemplate(){
        CaffeineTemplate<String, UserVO> caffeineTemplate = new CaffeineTemplate<>();
        caffeineTemplate.init();
        return caffeineTemplate;
    }

}
